package com.ruoyi.common.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 客户列对象 lp_client
 *
 * @author ruoyi
 * @date 2023-07-06
 */
@Data
public class Client extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Integer clientId;

    /** 客户名称 */
    @Excel(name = "客户名称")
    private String clientName;

    /** 分类Id */
    @Excel(name = "客户等级")
    private Integer clientClassifyId;

    /** 客户地址 */
    @Excel(name = "客户地址")
    private String clientAddress;

    /** 联系人 */
    @Excel(name = "联系人")
    private String clientPerson;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String clientPhone;
    /** 开户银行 */
    @Excel(name = "开户银行")
    private String financeBank;

    /** 应收款余额 */
    @Excel(name = "应收款余额")
    private BigDecimal financePrice;

    /** 销售人员 */
    @Excel(name = "销售人员")
    private Integer marketId;

    /** 审核状态 */
    @Excel(name = "审核状态")
    private Integer auditStatus;

    /** 审核意见 */
    @Excel(name = "审核意见")
    private String auditOpinion;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    /** 审核人 */
    @Excel(name = "审核人")
    private String auditPerson;

    /** 审批意见 */
    @Excel(name = "审批意见")
    private String approverOpinion;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date approverTime;

    /** 审批人 */
    @Excel(name = "审批人")
    private String approverPerson;

    /** 描述 */
    @Excel(name = "描述")
    private String description;

    private Market market;

    private ClientClassify clientClassify;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("clientId", getClientId())
                .append("clientName", getClientName())
                .append("clientClassifyId", getClientClassifyId())
                .append("clientAddress", getClientAddress())
                .append("clientPerson", getClientPerson())
                .append("clientPhone", getClientPhone())
                .append("financeBank", getFinanceBank())
                .append("financePrice", getFinancePrice())
                .append("marketId", getMarketId())
                .append("auditStatus", getAuditStatus())
                .append("auditOpinion", getAuditOpinion())
                .append("auditTime", getAuditTime())
                .append("auditPerson", getAuditPerson())
                .append("approverOpinion", getApproverOpinion())
                .append("approverTime", getApproverTime())
                .append("approverPerson", getApproverPerson())
                .append("description", getDescription())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
